/*
 * Function Auto update feed
 * Author: mr.Trieu
 **/

function autoFeed(showid) {
	ajax_backend();

	if(doc){
		doc.open('GET','ajax.php?mod=feed&do=feed&randval='+ Math.random(),false);
		doc.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		doc.send(null);

		if(doc.readyState == 4){
			if(doc.status == 200){
				document.getElementById(showid).innerHTML = doc.responseText;
			}
		}
	}

	setTimeout('autoFeed("'+showid+'")', 30000);
}
